package de.duester.vectordrawing.object;

import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.PointF;
import de.duester.vectordrawing.GraphicalObject;

/**
 * @author Maxim Duester
 */
public class Point extends GraphicalObject {

	/**
	 * 
	 */
	public Point() {
	}

	/**
	 * @param p
	 */
	public Point(PointF p) {
		super(p);
	}

	/* (non-Javadoc)
	 * @see de.duester.vectordrawing.GraphicalObject#getNonRotatedImage()
	 */
	@Override
	protected Bitmap getNonRotatedImage() {
		paint.setColor(getColor(0));

		Bitmap b = Bitmap.createBitmap(1, 1, Config.ARGB_8888);
		Canvas canvas = new Canvas(b);
		canvas.drawPoint(0, 0, paint);
		return b;
	}

	/* (non-Javadoc)
	 * @see de.duester.vectordrawing.GraphicalObject#getRotatedImage()
	 */
	@Override
	protected Bitmap getRotatedImage() {
		return getNonRotatedImageCache();
	}
}
